package com.wengzw.controller;

import com.alibaba.fastjson.JSON;
import com.wengzw.po.Customer;
import com.wengzw.po.User;
import com.wengzw.service.SearchService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@CrossOrigin
@RestController
@RequestMapping("/Client")
public class SearchController {
    @Resource
    private SearchService searchService;
    @RequestMapping("/search")
    public List<Customer> list(){
       return  searchService.findCustomerList();
    }
    
    @RequestMapping("/usersearch")
    public List<User> userlist(){
       return  searchService.findUserList();
    }
}
